import { ImportsMap } from 'unplugin-auto-import/types'
import {
  Package_Name,
  // API
  // classes
  DB_Name,
  // utils
  crud_Name,
  PouchDBUtil_Name,
  // 类型
  // classes
  PouchDBType_Name,
  PouchDBConfOptionsType_Name,
  PouchDBSaveReturnType_Name,
  PouchDBSaveBatchReturnType_Name,
  PouchDBFindOptionsType_Name,
  PouchDBFindReturnType_Name,
  PouchDBRemoveReturnType_Name,
  PouchDBRemoveBatchReturnType_Name,
  PouchDBDestroyReturnType_Name,
  // types
  ModelBaseType_Name,
  // utils
  SaveDocType_Name,
  SaveDocsType_Name,
  FindDocsType_Name,
  RemoveDocByIdType_Name,
  RemoveDocsByIdsType_Name,
  RemoveDocsType_Name,
  CrudType_Name,
  FindType_Name,
  RemoveByIdType_Name,
  RemoveByIdsType_Name,
  RemoveType_Name,
  SaveType_Name,
  SaveBatchType_Name
} from '@xtail/pouchdb'
import { AutoImportUtil } from '@xtail/unplugin'

export const XTailPouchdbAutoImports: () => ImportsMap = () =>
  AutoImportUtil.genAutoImports(Package_Name, [
    // classes
    DB_Name,
    // utils
    crud_Name,
    PouchDBUtil_Name
  ])

export type XTailPouchdbAutoImportsType = typeof XTailPouchdbAutoImports

export const XTailPouchdbTypeAutoImports = () =>
  AutoImportUtil.genTypeAutoImports(Package_Name, [
    // classes
    PouchDBType_Name,
    PouchDBConfOptionsType_Name,
    PouchDBSaveReturnType_Name,
    PouchDBSaveBatchReturnType_Name,
    PouchDBFindOptionsType_Name,
    PouchDBFindReturnType_Name,
    PouchDBRemoveReturnType_Name,
    PouchDBRemoveBatchReturnType_Name,
    PouchDBDestroyReturnType_Name,
    // types
    ModelBaseType_Name,
    // utils
    SaveDocType_Name,
    SaveDocsType_Name,
    FindDocsType_Name,
    RemoveDocByIdType_Name,
    RemoveDocsByIdsType_Name,
    RemoveDocsType_Name,
    CrudType_Name,
    FindType_Name,
    RemoveByIdType_Name,
    RemoveByIdsType_Name,
    RemoveType_Name,
    SaveType_Name,
    SaveBatchType_Name
  ])

export type XTailPouchdbTypeAutoImportsType = typeof XTailPouchdbTypeAutoImports
